/*
- Malt Project - typeobject.cpp
- This document is protected by the GPL protocol.
- Writer:@Index-Flandre
*/

#include "../../include/object/typeobject.hpp"

namespace malt
{

bool TypeObject::eq(void *obj)
{
	return obj == this;
}

void TypeObject::repl_print()
{
	printf("\e[32;1m%s\e[0m", this->name);
}

void TypeObject::marking() { return; }

TypeObject
	TypeType,
	BoolType,
	NumberType,
	StringType, SymbolType,
	ArrayType, ListType;

void TypeInit()
{
	TypeType.tp = &TypeType;
	TypeType.name = "type";
	BoolType.tp = &TypeType;
	BoolType.name = "bool";
	NumberType.tp = &TypeType;
	NumberType.name = "number";
	StringType.tp = &TypeType;
	StringType.name = "string";
	SymbolType.tp = &TypeType;
	SymbolType.name = "symbol";
	ArrayType.tp = &TypeType;
	ArrayType.name = "array";
	ListType.tp = &TypeType;
	ListType.name = "list";
}
}